function numberFormat(s,n){
	n = n > 0 && n <= 20 ? n : 2;
	s = App.toFixed(parseFloat((s + "").replace(/[^\d\.-]/g, "")),n) + "";
	var l = s.split(".")[0].split("").reverse(),
		r = s.split(".")[1];
	t = "";
	for(i = 0; i < l.length; i ++ ){
		t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
	} 
	return t.split("").reverse().join("") + (r ? ("." + r) : "");
}
angular.module('faApp')
	.filter('productSaleStatusRender', function() {
		return function(v) {
			var l = App.dictMap['productSaleStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "未知";
		}
	})
	.filter('productPevcSaleStatusRender', function() {
		return function(v) {
			var l = App.dictMap['pevcproductSaleStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "未知";
		}
	})
	.filter('productSupplierStatusRender', function() {
		return function(v) {
			var l = App.dictMap['productSupplierStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "未知";
		}
	})

	.filter('moneyRender', function() {
		return function(v,flag,yuanFlag) {
			v = App.getFloat(v);
			if (flag && v < 1)return "-";
			if (yuanFlag)return numberFormat(v,2) + "元";

			if (v / 100000000 >= 1) return numberFormat(v / 100000000) + "亿元";
			else if (v / 10000 >= 1) return numberFormat(v / 10000) + "万元";
			else return numberFormat(v) + "元";
		}
	})
	.filter('profitRender', function() {
		return function(rate, flag) {

			if(rate==undefined) return "-"
			rate = rate || 0;
			if (flag && rate <= 0) return "-";
			if (rate > 100) rate = 100;
			if (/^[\d.]+$/.test(rate)){
				return (rate || 0) + "%";
			}else{
				return rate;
			}
		}
	})
	.filter('orderStatusRender', function() {
		return function(v) {
			var l = App.dictMap['orderStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return v;
		}
	})
	.filter('oDefriendStatusRender', function() {
		return function(v) {
			var l = App.dictMap['oDefriendStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('orderNextStatusRender', function() {
		return function(status) {
			var status = status + "",
				text = "";
			if (status == "110" || status == "120" || status == "121" || status == "122" || status == "123" || status == "124"){
				text = "130";
			}else if (status == "130"){
				text = "210";
			}else if (status == "140"){
				return "";
			}else if (status == "210"){
				text = "";
			}else if (status == "220"){
				text = "240";
			}else if (status == "240"){
				text = "";
			}else if (status == "250"){
				text = "320";
			}else if (status == "310" || status == "311" || status == "312" || status == "313"){
				text = "320";
			}else if (status == "314"){
				text = "320";
			}else if (status == "320"){
				text = "";
			}else if (status == "330"){
				text = "";
			}else if (status == "999"){
				text = "";
			}
			return text;
		}
	})
	.filter('orderNextStatusTextRender', function() {
		return function(status) {
			var status = status + "",
				text = "预约已提交，等待结果";
			if (status == "110" || status == "120" || status == "121" || status == "122" || status == "123" || status == "124"){
				text = "预约成功";
			}else if (status == "130"){
				text = "合同已寄出";
			}else if (status == "140"){
				return "交易结束";
			}else if (status == "210"){
				text = "等待打款";
			}else if (status == "220"){
				text = "确认到款";
			}else if (status == "240"){
				text = "等待产品成立";
			}else if (status == "250"){
				text = "确认返佣";
			}else if (status == "310" || status == "311" || status == "312" || status == "313"){
				text = "确认返佣";
			}else if (status == "314"){
				text = "确认返佣";
			}else if (status == "320"){
				text = "等待反佣确认";
			}else if (status == "330"){
				text = "交易结束";
			}else if (status == "999"){
				text = "交易结束";
			}
			return text;
		}
	})
	.filter('processBtnTextRender', function() {
		return function(status) {
			var status = status || 0;
			if (status == "110" || status == "120" || status == "121" || status == "122" || status == "123" || status == "124"){
				return "预约已提交，请等待结果";
			}else if (status == "130"){
				return "预约已成功,请等待合同";
			}else if (status == "140"){
				return "预约失败，返回列表";
			}else if (status == "210"){
				return "下一步:已签约打款";
			}else if (status == "220"){
				return "等待到款确认，返回列表";
			}else if (status == "240"){
				return "等待产品成立，返回列表";
			}else if (status == "250"){
				return "产品已成立，返回列表";
			}else if (status == "310" || status == "311" || status == "312" || status == "313"){
				return "对帐中，返回列表";
			}else if (status == "314"){
				return "已对帐，等待返佣，返回列表";
			}else if (status == "320"){
				return "下一步:确认返佣";
			}else if (status == "330"){
				return "返回列表";
			}else if (status == "999"){
				return "已取消";
			}else{
			}
		}
	})
	.filter('customerFocusType', function() {
		return function(status) {
			var status = status || 0;
			if (status == "110110" ){
				return "店铺首页";
			}else if (status == "110201"){
				return "信托";
			}else if (status == "110202"){
				return "资管";
			}else if (status == "110203"){
				return "PEVC";
			}else if (status == "110204"){
				return "私募";
			}else if (status == "110205"){
				return "基金详情附件";
			}else if (status == "110209"){
				return "自有产品";
			}else if (status == "110300"){
				return "店铺活动列表";
			}else if (status == "110301"){
				return "店铺活动详情";
			}else if (status == "120201"){
				return "私募产品详情页";
			}else if (status == "120202"){
				return "基金产品详情页";
			}else if (status == "120203"){
				return "私募产品详情页附件查看";
			}else if (status == "120204"){
				return "基金产品详情页附件查看";
			}else if (status == "110507"){
				return "金策师私募产品详情页";
			}else if (status == "110508"){
				return "金策师基金产品详情页";
			}else if (status == "110509"){
				return "金策师私募产品详情页附件查看";
			}else if (status == "110510"){
				return "金策师基金产品详情页附件查看";
			}
		}
	})
	.filter('sexRender', function() {
		return function(v) {
			return v == 1 ? "男" : ( v == 2 ? "女" : "保密");
		}
	})
	.filter('taskStatusRender', function() {
		return function(v) {
			return v == 0 ? "已取消" : (v == 1 ? "未完成" : "已完成");
		}
	})
	.filter('scheduleTypeRender', function() {
		return function(v) {
			return v == 1 ? "拜访" : ( v == 2 ? "备忘" : "提醒");
		}
	})
	.filter('commentStatusRender', function() {
		return function(v) {
			return v == 1 ? "未完成" : ( v == 2 ? "已完成" : "其它");
		}
	})
	.filter('certStatusRender', function() {
		return function(v) {
			return v == 1 ? "未认证" : ( v == 2 ? "初级理财师" : ( v == 3 ? "中级理财师" : ( v == 4 ? "高级理财师" : ( v == 9 ? "机构用户" : "其它"))));
		}
	})
	.filter('userLevelRender', function() {
		return function(v) {
			return v < 10 ? "未认证" : ( v < 20 ? "初级理财师" : ( v < 30 ? "中级理财师" : ( v < 40 ? "高级理财师" : "其它")));
		}
	})
	.filter('messageTypeRender', function() {
		return function(v) {
			var m = {"01":"系统公告","02":"交易通知","03":"生日提醒","04":"个人日程","05":"存续付息","06":"活动通知","07":"满期兑付","08":"赎回通知"};
			return m[v] ? m[v] : "其它";
		}
	})
	.filter('certTypeTextRender', function() {
		return function(v) {
			var l = [{"value":"证劵执业资格","code":"01"},{"value":"基金执业资格","code":"02"},{"value":"期货执业资格","code":"03"},{"value":"黄金投资分析师职业资格","code":"04"},{"value":"上海金交所交易员资格","code":"05"},{"value":"理财规划师职业资格","code":"06"},{"value":"保险咨询","code":"07"},{"value":"港股投资咨询","code":"08"},{"value":"美国证券期货执业资格","code":"09"},{"value":"金融理财师职业资格","code":"10"},{"value":"特许金融分析师资格","code":"11"},{"value":"注册国际投资分析师资格","code":"12"}];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.code == v)return o.value;
			}
			return "";
		}
	})
	.filter('tradeTextRender', function() {
		return function(v) {
			var l =  [ { value:"01",text:"基金"}, { value:"02",text:"证劵"}, { value:"03",text:"期货"}, { value:"04",text:"投资"}, { value:"05",text:"银行"}, { value:"06",text:"保险"}, { value:"07",text:"信托"}, { value:"08",text:"担保"}, { value:"09",text:"拍卖"}, { value:"10",text:"典当"}, { value:"11",text:"其他"}, ];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('faCustomerCategory', function() {
		return function(v) {
			var l =  [ { value:"1",text:"潜在客户"}, { value:"2",text:"普通客户"}, { value:"3",text:"合作伙伴"}, { value:"4",text:"重要客户"}, { value:"5",text:"失效客户"}, ];

			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('faCustomerHeat', function() {
		return function(v) {
			var l =  [ { value:"1",text:"A类客户"}, { value:"2",text:"B类客户"}, { value:"3",text:"C类客户"},];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('faCustomerLable', function() {
		return function(v) {
			var l =  [ { value:"1",text:"信托"}, { value:"2",text:"资管"}, { value:"3",text:"PE/VC"},{ value:"4",text:"阳关私募"},{ value:"5",text:"海外保险"},];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('faCustomerKnowledge', function() {
		return function(v) {
			var l =  [ { value:"1",text:"不熟悉"}, { value:"2",text:"一般熟悉"}, { value:"3",text:"非常熟悉"},];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('faCustomerStage', function() {
		return function(v) {
			var l =  [ { value:"1",text:"初步沟通"}, { value:"2",text:"潜在客户跟踪"}, { value:"3",text:"合同执行"},{ value:"4",text:"产品成立"},{ value:"5",text:"合同期满"},];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('dueTimeRender', function() {
		return function(day) {
			return (day || "") + "个月";
		}
	})
	.filter('productLevelRender', function() {
		return function(v) {
			var l =  App.pLevelModel;
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('ageRender', function() {
		return function(v) {
			v = (v|| "0") ;
			return v != "0" ? v : "-";
		}
	})
	.filter('newsTypeRender', function() {
		return function(v) {
			var l =  App.newsTypeMapModel;
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('truncate', function () {
		return function (text, length, end) {
			text = text || "";
			if (isNaN(length)) length = 10;

			if (end === undefined)
				end = "...";

			if (text.length <= length || text.length - end.length <= length) {
				return text;
			}
			else {
				return String(text).substring(0, length-end.length) + end;
			}

		};
	})
	.filter('productTypeRender', function() {
		return function(v) {
			var l = App.productTypeModel;
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('paymentInterestTypeRender', function() {
		return function(v) {
			var l = App.paymentInterestTypeModel;
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('profitTypeRender', function() {
		return function(v) {
			var m = {"01":"固定收益","02":"浮动收益"};
			return m[v] ? m[v] : "其它";
		}
	})
	.filter('investTypeRender', function() {
		return function(v) {
			var l = App.investTypeModel;
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('publicAreaRender', function() {
		return function(v) {
			var l = App.publicAreaModel;
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "全国";
		}
	})
	.filter('to_trusted', ['$sce', function($sce){
		return function(text) {
			return $sce.trustAsHtml(text);
		};
	}])

	.filter('attachmentFileTypeRender', function() {
		return function(v) {
			var l = App.attachmentFileTypeMap;
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('advertPositionSizeRender', function() {
		return function(v) {
			var l = App.advertPositionModel;
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.size;
			}
			return "";
		}
	})

	.filter('advertPositionRender', function() {
		return function(v) {
			var l = App.advertPositionModel;
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})


	.filter('productRecommendPositionRender', function() {
		return function(v) {
			var l = App.dictMap['productRecommendModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return v;
		}
	})

	.filter('advertStatusRender', function() {
		return function(v) {
			var m = {"01":"已上架","02":"已下架"};
			return m[v] ? m[v] : "其它";
		}
	})
	.filter('productPublicStatusRender', function() {
		return function(v) {
			var l = App.productPublicStatusModel;
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('productStatusRender', function() {
		return function(v) {
			var l = App.productStatusModel;
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('pEndEarlyIdentificationRender', function() {
		return function(v) {
			var l = App.dictMap['pEndEarlyIdentification'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('isListRender', function() {
		return function(v) {
			var m = {"01":"是","02":"否"};
			return m[v] ? m[v] : "其它";
		}
	})
	.filter('faStatusRender', function() {
		return function(v) {
			var m = {"01":"正常","02":"禁用","03":"注销","04":"黑名单"};
			return m[v] ? m[v] : "其它";
		}
	})
	.filter('withdrawStatusRender', function() {
		return function(v) {
			var l = App.dictMap['withdrawStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return v;
		}
	})
	.filter('mediaSourceRender', function() {
		return function(v) {
			var l = App.dictMap['mediaSourceModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return v;
		}
	})
	.filter('isEqualMyphone',function(){
		return function (v){
			var mphone = v.substr(0, 3) + '****' + v.substr(7);


			return mphone
		}
	})
	.filter('actSourceRender', function() {
		return function(v) {
			var l = App.dictMap['actSourceModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return v;
		}
	})
	.filter('doNothingRender', function() {
		return function(v) {
			return v;
		}
	})

	.filter('fissInvestTypeRender', function() {
		return function(v) {
			var l = App.dictMap['fissInvestTypeModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})

	.filter('fissInvestTermRender', function() {
		return function(v) {
			var l = App.dictMap['fissInvestermModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('bankTypeRender', function() {
		return function(v) {
			var l = App.dictMap['bankTypeModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('oRebateTypeRender', function() {
		return function(v) {
			if(v == 2){
				return '财务线下结佣';
			}else if(v == 1){
				return '用户自提';
			}else{
				return "";
			}
		}
	})
	.filter('userStatusRender', function() {
		return function(v) {
			var l = App.dictMap['userStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('cgbdColorRender', function() {
		return function(v) {
			var l = {"新进":"xj","增仓":"zc","不变":"bb","减仓":"jc"}
			return l[v] || "";
		}
	})
	.filter('faRoleStatusRender',function() {
		return function(v,r) {
			var m = {"01":"正常","02":"禁用","03":"注销","04":"黑名单"};
			var vv = m[v] ? m[v] : "其它";
			if (vv == "正常"){
				var l = App.dictMap['roleMapModel'];
				for (var i = 0; i < l.length;i++){
					var o = l[i];
					if (o.value == r)return o.text;
				}
			}else{
				return vv;
			}
			return "";
		}
	})
    .filter('faRzStatusRender',function() {
        return function(v,r) {
            var m = {"01":"正常","02":"禁用","03":"注销","04":"黑名单"};
            var vv = m[v] ? m[v] : "其它";
            if (vv == "正常"){
                var l = App.dictMap['rzMapModel'];
                for (var i = 0; i < l.length;i++){
                    var o = l[i];
                    if (o.value == r)return o.text;
                }
            }else{
                return vv;
            }
            return "";
        }
    })
	.filter('simuStatusRender', function() {
		return function(v) {
			var l = App.dictMap['simuStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('urlPrefixRender', function() {
		return function(v) {
			v = v || "";
			if (v.substring(0,7) == "http://"){
				return v;
			}else{
				return App.staticHost + v;
			}
		}
	})
	.filter('simuOrderStatusRender', function() {
		return function(v) {
			var l = App.dictMap['simuOrderStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('millionStatusRender', function() {
		return function(v) {
			var l = App.dictMap['millionStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('millionTypeRender', function() {
		return function(v) {
			var l = App.dictMap['millionTypeModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('pSizeRatioTypeRender', function() {
		return function(v) {
			var l = App.dictMap['pSizeRatioTypeModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('orderDefriendStatusRender', function() {
		return function(v) {
			var l = App.dictMap['orderDefriendStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "有效";
		}
	})
	.filter('activitiesCodeRender', function() {
		return function(v) {
			var l = App.dictMap['activitiesCodeModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return v;
		}
	})
	.filter('m2bWinTypeRender', function() {
		return function(v) {
			var l = App.dictMap['m2bWinTypeModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('adMsgTypeRender', function() {
		return function(v) {
			var l = App.dictMap['adMsgTypeModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return o.value;
		}
	})
	.filter('switchRender', function() {
		return function(v) {
			var l = App.dictMap['switchModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return o.value;
		}
	})
	.filter('activitiesStatusRender', function() {
		return function(v) {
			var l = App.dictMap['activitiesStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return o.value;
		}
	})
	.filter('messageSortRender', function() {
		return function(v) {
			var l = App.dictMap['messageSortModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return o.value;
		}
	})
	.filter('tjzlView', function() {
		return function(v) {
			var	text = "";
			if (v == "01"||v=="1"){
				text = "身份证正面";
			}else if (v == "02"||v == "2"){
				text = "身份证反面";
			}else if (v == "03"||v == "3"){
				return "银行卡";
			}else if (v == "04"||v == "4"){
				text = "打款凭条";
			}else if (v == "05"||v == "5"){
				return "签字页";
			}else if (v == "06"||v == "6"){
				text = "合同封面";
			}else if (v == "07"||v == "7"){
				return "手持签字页与合同封面照";
			}else if (v == "08"||v == "8"){
				text = "其它";
			}
			return text;
		}
	})
	.filter('oPhoStatusView', function() {
		return function(v) {
			var	text = "未提交审核";
			if (v == "01" ){
				text = "未提交审核";
			}else if (v == "02"){
				return "审核中";
			}else if (v == "03"){
				text = "审核通过";
			}else if(v=="04"){
				text="退回";
			}
			return text;
		}
	})
	.filter('tjzlStatus', function() {
		return function(v) {
			if(v==undefined)return "";
			var	text = v.replace("1","  三件套  ").
			replace("5","  签字页  ").replace("6","  合同封面  ").
			replace("6","  合同封面  ").replace("7","  手持签字页与合同封面照  ").replace("8","  其它  ");
			return text;
		}
	})

	.filter('p2oTypefilter',function(){
		return function(v) {
			if(v==undefined)return "";
			var str=v;
			if(str=='02'){
				str="01";
			}else if(str=='03'){
				str="02";
			}
			return str;
		}
	})
	.filter('pevczzxsRender',function(){
		return function(v) {
			if(v==undefined)return "";
			var str=v;
			if(str=='01'){
				str="信托";
			}else if(str=='02'){
				str="券商资管";
			}else if(str=='03'){
				str="有限合伙";
			}else if(str=='04'){
				str="契约型基金";
			}else if(str=='05'){
				str="基金子公司";
			}else if(str=='06'){
				str="其他";
			}
			return str;
		}
	})
	.filter('oPhoStatusShow',function(){
		return function(v) {
			if(v==undefined)return true;
			var str=false;
			if(v=='03'||v=='02'){
				str=false;
			}else{
				str=true;
			}
			return str;
		}
	})
	.filter('oKnotTypeRender', function() {
		return function(v) {
			var l = App.dictMap['knotTypeModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return "";
		}
	})
	.filter('bankcardShow',function(){
		return function(v) {
			if(v==undefined)return "";
			var str="";
			if(/^(\d{16}|\d{19})$/.test(v) ){
				str=v;
			}else{
				str="";
			}
		}
	})
	.filter('noticeStatus',function(){
		return function(v) {
			if(v==undefined)return v;
			var str="";
			if(v=='1'){
				str="未审核";
			}else{
				str="已审核";
			}
			return str;
		}
	})
	.filter('checkStatusRender',function(){
		return function(v) {
			if(v==undefined)return '';
			var str='';
			if(v=='0'){//审核状态 0待审核,1审核中,2审核通过,3审核不通过,4产品发布,5产品成立，6产品发布失败
				str="待审核";
			}else if(v=='1'){
				str="审核中";
			}else if(v=='2'){
				str="审核通过";
			}else if(v=='3'){
				str="不合格";
			}else if(v=='4'){
				str="产品发布";
			}else if(v=='5'){
				str="产品成立";
			}else if(v=='6'){
				str="产品发布失败";
			}
			return str;
		}
	})
	.filter('moneyRender2', function() {
		return function(v,flag,yuanFlag) {
			if(v==undefined) return "-"

			v = App.getFloat(v);
			if(v==undefined) return "-"
			if(v < 0) return  v +"元"
			if(v==0.00 )return "0元";

			if (yuanFlag)return numberFormat(v,2) + "元";

			if (v / 100000000 >= 1) return numberFormat(v / 100000000) + "亿元";
			else if (v / 10000 >= 1) return numberFormat(v / 10000) + "万元";
			else return numberFormat(v) + "元";
		}
	})
	.filter('profitRender2', function() {
		return function(rate, flag) {
			if(rate==undefined) return "-"
			rate = rate || 0;
			if (flag && rate <= 0) return "-";
			if (rate > 100) rate = 100;
			if (/^[\d.]+$/.test(rate)){
				return (rate || 0) + "%";
			}else{
				return rate;
			}
		}
	})
	.filter('onlineStatus',function(){
		return function(v) {
			if(v==undefined)return v;
			var str="";
			if(v=='1'){
				str="未发布";
			}else{
				str='已发布';
			}
			return str;
		}
	})
	.filter('customerCategoryRender', function() {
		return function(v) {
			if(v == null){
				return "未分类客户";
			}
			var l = App.dictMap['customerCategoryModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return v;
		}
	})
	.filter('customerClickBtnType', function() {
		return function(v) {
			if(v == null){
				return "其他";
			}
			var l = App.dictMap['customerClickBtnModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return v;
		}
	})

	.filter('fpGroupStatusRenter', function() {
		return function(v) {
			if(v == null){
				return "其他";
			}
			var l = App.dictMap['fpGroupStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return v;
		}
	})
	.filter('hadGetGiftRenter', function() {
		return function(v) {
			if(v == null){
				return "否";
			}
			if(v){
				return "是";
			}
			return "否";
		}
	})
	.filter('fpGroupSendAmountStatusRenter', function() {
		return function(v) {
			if(v == null){
				return "否";
			}
			if(v==2){
				return "是";
			}
			return "否";
		}
	})
	.filter('bidMarginRenter', function() {
		return function(v) {
			if(v == 2){
				return "否";
			}
			if(v == 1){
				return "是";
			}
			return "否";
		}
	})
	.filter('biddingStatusModelRenter', function() {
		return function(v) {
			if(v == null){
				return "其他";
			}
			var l = App.dictMap['biddingStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return v;
		}
	})
	.filter('recommentTypeModelRenter', function() {
		return function(v) {
			if(v == null){
				return "其他";
			}
			var l = App.dictMap['recommentTypeModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return v;
		}
	})
	.filter('payStatusModelRenter', function() {
		return function(v) {
			if(v == null){
				return "其他";
			}
			var l = App.dictMap['payStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return v;
		}
	})
	.filter('operateTypeModelRenter', function() {
		return function(v) {
			if(v == null){
				return "其他";
			}
			var l = App.dictMap['operateTypeModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return v;
		}
	})
	.filter('payStatusRenter', function() {
		return function(v) {
			var	text = "";
			if (v == "2"){
				text = "支付成功";
			}else if (v == "3"){
				text = "支付失败";
			}else if (v == "0"){
				return "待支付";
			}
			return text;
		}
	})
	.filter('fetchStatusRenter',function() {
		return function(v){
			if(v == '01'){
				return '保证金';
			}else if(v == '02'){
				return '佣金';
			}else{
				return '其他';
			}
		}
	})
	.filter('oYouDanReceiverRenter',function() {
		return function(v){
			if(v){
				return '已支付';
			}else{
				return '未支付';
			}
		}
	})
	.filter('rebateTypeFilter',function() {
		return function(v){
			if(v==''||v==undefined){
				return "-";
			}
			if(v==1){
				return '按投资金额返佣';
			}else{
				return '按固定费率返佣';
			}
		}
	})
	.filter('ratefilter',function() {
		return function(v){
			if(v==''||v==undefined)
				return "-";
			if(/^.*%$/.test(v) ){
				return v;
			}else{
				return v+"%";
			}
		}
	})
	.filter('bailAmountRender',function() {
		return function(v){
			if(v==0)
				return "---";
			return v+"元";
		}
	})

	.filter('activityProductStatusRender', function() {
		return function(v) {
			var m = {"01":"上架","02":"下架"};
			return m[v] ? m[v] : v;
		}
	})
	.filter('newsSendType', function() {
		return function(v) {
			var m = {"01":"及时推送","02":"定时推送"};
			return m[v] ? m[v] : v;
		}
	})
	.filter('newsStatusRender', function() {
		return function(v) {
			var l = App.dictMap['newsStatusModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v) return o.text;
			}
			return v;
		}
	})
	.filter('webNameFilter',function() {
		return function(v){
			if(v=='1caifu')
				return "壹财富";
			return v;
		}
	})
	.filter('pageTypeFilter',function() {
		return function(v){
			if(v=='trust')
				return "信托";
			else if(v=='assetManagement')
				return "资管";
			return v;
		}
	})
	.filter('CompanyReFilter',function() {
		return function(v){
			if(v == '1'){
				return "线下渠道";
			} else {
				return "线上渠道";
			}
		}
	})
	.filter('regiterseFilter',function() {
		return function(v){
			if(v == '1'){
				return "是";
			} else {
				return "否";
			}
		}
	})
.filter('blindateUserSexFilter',function() {
	return function(v) {
		var l = App.dictMap['blindateUserSexModel'];
		for (var i = 0; i < l.length; i++) {
			var o = l[i];
			if (o.value == v) return o.text;
		}
		return v;
	}
})
.filter('dynamicStateFilter',function() {
	return function(v) {
		var l = App.dictMap['dynamicStateModel'];
		for (var i = 0; i < l.length; i++) {
			var o = l[i];
			if (o.value == v) return o.text;
		}
		return v;
	}
})
.filter('blindateSourceFilter',function() {
	return function(v) {
		var l = App.dictMap['blindateSourceModel'];
		for (var i = 0; i < l.length; i++) {
			var o = l[i];
			if (o.value == v) return o.text;
		}
		return v;
	}
})
.filter('pBelongAreaRender',function(){
	return function(v){
		var l = App.dictMap['pbelongAreaModel'];
		for (var i = 0; i < l.length; i++) {
			var o = l[i];
			if (o.value == v) return o.text;
		}
		return v;
	}
})
.filter('filterFee',function(){
	return function(v){
		if(v == undefined || v == ''){
        return "-";
    }
    if(/^[\d.]+$/.test(v)){
      return v+"%";
    }else{
      return v;

    }
	}
})
.filter('orderListTitleRender',function() {
	return function(v) {
		var l = App.dictMap['orderListTitleModel'];
		for (var i = 0; i < l.length; i++) {
			var o = l[i];
			if (o.value == v) return o.text;
		}
		return v;
	}
})
.filter('contractStatusRender',function() {
	return function(v) {
		var l = App.dictMap['contractStatusModel'];
		for (var i = 0; i < l.length; i++) {
			var o = l[i];
			if (o.value == v) return o.text;
		}
		if(v=='')return "待申请";
		return v;
	}
})
.filter('contractStatusMKRender',function() {
	return function(v) {
		var l = App.dictMap['contractStatusMKModel'];
		for (var i = 0; i < l.length; i++) {
			var o = l[i];
			if (o.value == v) return o.text;
		}
		if(v=='')return "申请";
		return v;
	}
})
.filter('orderStatusToNameRender',function() {
	return function(v) {
		var l = App.dictMap['orderStatusToNameModel'];
		for (var i = 0; i < l.length; i++) {
			var o = l[i];
			if (o.value == v) return o.text;
		}
		return v;
	}
})
.filter('costTypeRender',function() {
	return function(v) {
		var s = App.dictMap['costTypeFrontModel'];
		for (var i = 0; i < s.length; i++) {
			var o = s[i];
			if (o.value == v) return o.text;
		}
		var l = App.dictMap['costTypeModel'];
		for (var i = 0; i < l.length; i++) {
			var o = l[i];
			if (o.value == v) return o.text;
		}

		return v;
	}
})
.filter('flagCostTypeRender',function() {
	return function(v) {
		var l = App.dictMap['costTypeModel'];
		for (var i = 0; i < l.length; i++) {
			var o = l[i];
			if (o.value == v) return true;
		}
		return false;
	}
})
.filter('createByFilterByRender',function() {
	return function(v) {
		if(/^[\d.]+$/.test(v)){
			return "客户";
		}
		return v;
	}
})
	.filter('shopUserRzStatus',function() {
		return function(v) {

			var l = App.dictMap['rzMapModel'];
			for (var i = 0; i < l.length;i++){
				var o = l[i];
				if (o.value == v)return o.text;
			}
			return '未提交认证';
		}
	})

	.filter('answeNum',function() {
		return function(v) {

			if(v==1) {
				return 'A';
			} else if(v==2) {
				return 'B';
			} else if(v==3) {
				return 'C';
			} else if(v==4) {
				return 'D';
			} else if(v==5) {
				return 'E';
			} else if(v==6) {
				return 'F';
			} else if(v==7) {
				return 'G';
			} else if(v==8) {
				return 'H';
			} else if(v==9) {
				return 'I';
			} else if(v==10) {
				return 'J';
			} else if(v==11) {
				return 'K';
			} else if(v==12) {
				return 'L';
			} else if(v==13) {
				return 'M';
			} else if(v==14) {
				return 'N';
			} else if(v==15) {
				return 'O';
			} else if(v==16) {
				return 'P';
			} else if(v==17) {
				return 'Q';
			} else if(v==18) {
				return 'R';
			} else if(v==19) {
				return 'S';
			} else if(v==20) {
				return 'T';
			} else if(v==21) {
				return 'U';
			} else if(v==22) {
				return 'V';
			} else if(v==23) {
				return 'W';
			} else if(v==24) {
				return 'X';
			} else if(v==25) {
				return 'Y';
			} else if(v==26) {
				return 'Z';
			}
			return '';
		}
	})
    .filter('informationTime',function() {
        return function(v) {
            var date = new Date(v);
            var curdate = new Date();
            if(date.getTime() <= curdate.getTime()){
                return date
            }
            return '';
        }
    })
   .filter('prizesTypeFilter',function($filter) {
        return function(v) {
            if(v=='1') {
							return "一等奖";
						} else if(v=='2') {
							return "二等奖";
						} else if(v=='3') {
							return "三等奖";
						} else if(v=='4') {
							return "四等奖";
						} else if(v=='5') {
							return "五等奖";
						}else{
            	return '';
						}
        }
    })
    .filter('hiddenFirst',function($filter) {
        return function(v) {
            if(v==''||v==undefined) {
							return "";
						}else{
							return v.slice(0,1)+"**";
						}
        }
    })
    .filter('hiddenMobile',function($filter) {
        return function(v) {
            if(v==''||v==undefined) {
							return "";
						}else{
							return v.slice(0,3)+"****"+v.slice(7,11);
						}
        }
    })


    .filter('toSplitProductName', ['$sce', function($sce){ 

    		return function(text) { var reg=new RegExp(",","g");    return $sce.trustAsHtml(text.replace(reg,'<br/>')); }; 
   	}]);

;

